package com.qianyue.责任链模式;

/**
 * 客户端
 *
 * @author qian yue
 * @version v1.0.0
 * @since 2025/2/9 19:55
 */
public class Client {
    public static void main(String[] args) {
        LeaveRequest leaveRequest = new LeaveRequest(3, "请假休息", "小明");

        // 各位领导
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(new 总经理());

        // 处理
        groupLeader.submit(leaveRequest);
    }
}
